package cn.bzc.data.process.controller;

import cn.bzc.data.process.model.entity.CustData;
import cn.bzc.data.process.service.DataProcessService;
import cn.bzc.data.process.service.PmBillDataService;
import com.alibaba.cola.dto.Response;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping ("/pmBalance11111")
public class DataController {
    @Resource
    private PmBillDataService pmBillDataService;
    @Resource
    private DataProcessService dataProcessService;
    @GetMapping("/initData111")
    public Response initBalanceData() {
        pmBillDataService.replaceDataV2();
//        pmBillDataService.replaceData();
        return Response.buildSuccess();
    }
    @GetMapping("/checkData111")
    public Response checkData() {
//        pmBillDataService.replaceDataV2();
//        pmBillDataService.recoverData();
        pmBillDataService.check();
        return Response.buildSuccess();
    }

    @GetMapping("/custProcess")
    public Response custProcess() {
//        pmBillDataService.replaceDataV2();
//        pmBillDataService.recoverData();
        dataProcessService.processCustData();
        return Response.buildSuccess();
    }

}
